<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Kafka Practise</title>
</head>
<body>
<h1>Kafka 作业</h1>

动作模拟：
<input type="button" value="点击" onclick="sendLog('click');">
<input type="button" value="收藏" onclick="sendLog('job_collect');">
<input type="button" value="投简历" onclick="sendLog('cv_send');">
<input type="button" value="上传简历" onclick="sendLog('cv_upload');">
</body>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
    const mockUserId = '000001'
    const mockJobCode = 'java'

    function sendLog(action) {
        axios.post('/kafka/log', {
            user_id: mockUserId,
            act_time: Date.now(),
            action: action,
            job_code: mockJobCode
        })
    }
</script>
</html>